package com.tempjob.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.IdTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 短信发送记录
 *
 * @TableName sys_sms_log
 */
@CollectionName(value = "sys_sms_log")
@Data
public class SysSmsLog implements Serializable {

    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    private String id;

    @CollectionField(value = "mobile")
    @ApiModelProperty("手机号")
    private String mobile;

    @CollectionField(value = "sms_type")
    @ApiModelProperty("短信类型:1注册登录2通知")
    private Integer smsType;

    @CollectionField(value = "sms_request_id")
    @ApiModelProperty("短信唯一标识")
    private String smsRequestId;

    @CollectionField(value = "content")
    @ApiModelProperty("内容")
    private String content;

    @CollectionField(value = "status")
    @ApiModelProperty("状态:0发送失败1接口发送成功2已验证")
    private Integer status;

    @CollectionField(value = "limit_time")
    @ApiModelProperty("有效时间")
    private Date limitTime;

    @CollectionField(value = "oper_time")
    @ApiModelProperty("更新时间")
    private Date operTime;

    @CollectionField(value = "create_time")
    @ApiModelProperty("创建时间")
    private Date createTime = new Date();

    @CollectionField(exist = false)
    private static final long serialVersionUID = 1L;
}
